package cn.it.infrastructure.po;

import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * 
 * @TableName tb_business
 */
@Data
public class TbBusiness implements Serializable {
    /**
     * 主键
     */
    private Integer id;

    /**
     * 商家名称
     */
    private String name;

    /**
     * 商家账号
     */
    private String username;

    /**
     * 商家密码
     */
    private String password;

    /**
     * 商家图片
     */
    private String imageUrl;

    /**
     * 店铺类型
     */
    private String type;

    /**
     * 发货地
     */
    private String address;

    /**
     * 商家粉丝数
     */
    private Integer fans;

    /**
     * 商家描述
     */
    private String description;

    /**
     * 1为正常,0为封号
     */
    private Integer status;

    /**
     * 商家创建时间
     */
    private Date createTime;

    /**
     * 商家最后一次更新时间
     */
    private Date updateTime;

    /**
     * 商家权限 0为管理员,1为所有权限,2为取消下载权限,3为取消查看权限
     */
    private Integer roleId;

    /**
     * 特色一
     */
    private Integer type1;

    /**
     * 特色二
     */
    private Integer type2;

    /**
     * 特色三
     */
    private Integer type3;

    /**
     * 特色四
     */
    private Integer type4;

    /**
     * 特色五
     */
    private Integer type5;

    /**
     * 权限一
     */
    private String value1;

    /**
     * 权限一
     */
    private String value2;

    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        TbBusiness other = (TbBusiness) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName()))
            && (this.getUsername() == null ? other.getUsername() == null : this.getUsername().equals(other.getUsername()))
            && (this.getPassword() == null ? other.getPassword() == null : this.getPassword().equals(other.getPassword()))
            && (this.getImageUrl() == null ? other.getImageUrl() == null : this.getImageUrl().equals(other.getImageUrl()))
            && (this.getType() == null ? other.getType() == null : this.getType().equals(other.getType()))
            && (this.getAddress() == null ? other.getAddress() == null : this.getAddress().equals(other.getAddress()))
            && (this.getFans() == null ? other.getFans() == null : this.getFans().equals(other.getFans()))
            && (this.getDescription() == null ? other.getDescription() == null : this.getDescription().equals(other.getDescription()))
            && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()))
            && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
            && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()))
            && (this.getRoleId() == null ? other.getRoleId() == null : this.getRoleId().equals(other.getRoleId()))
            && (this.getType1() == null ? other.getType1() == null : this.getType1().equals(other.getType1()))
            && (this.getType2() == null ? other.getType2() == null : this.getType2().equals(other.getType2()))
            && (this.getType3() == null ? other.getType3() == null : this.getType3().equals(other.getType3()))
            && (this.getType4() == null ? other.getType4() == null : this.getType4().equals(other.getType4()))
            && (this.getType5() == null ? other.getType5() == null : this.getType5().equals(other.getType5()))
            && (this.getValue1() == null ? other.getValue1() == null : this.getValue1().equals(other.getValue1()))
            && (this.getValue2() == null ? other.getValue2() == null : this.getValue2().equals(other.getValue2()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getName() == null) ? 0 : getName().hashCode());
        result = prime * result + ((getUsername() == null) ? 0 : getUsername().hashCode());
        result = prime * result + ((getPassword() == null) ? 0 : getPassword().hashCode());
        result = prime * result + ((getImageUrl() == null) ? 0 : getImageUrl().hashCode());
        result = prime * result + ((getType() == null) ? 0 : getType().hashCode());
        result = prime * result + ((getAddress() == null) ? 0 : getAddress().hashCode());
        result = prime * result + ((getFans() == null) ? 0 : getFans().hashCode());
        result = prime * result + ((getDescription() == null) ? 0 : getDescription().hashCode());
        result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
        result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
        result = prime * result + ((getRoleId() == null) ? 0 : getRoleId().hashCode());
        result = prime * result + ((getType1() == null) ? 0 : getType1().hashCode());
        result = prime * result + ((getType2() == null) ? 0 : getType2().hashCode());
        result = prime * result + ((getType3() == null) ? 0 : getType3().hashCode());
        result = prime * result + ((getType4() == null) ? 0 : getType4().hashCode());
        result = prime * result + ((getType5() == null) ? 0 : getType5().hashCode());
        result = prime * result + ((getValue1() == null) ? 0 : getValue1().hashCode());
        result = prime * result + ((getValue2() == null) ? 0 : getValue2().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", name=").append(name);
        sb.append(", username=").append(username);
        sb.append(", password=").append(password);
        sb.append(", imageUrl=").append(imageUrl);
        sb.append(", type=").append(type);
        sb.append(", address=").append(address);
        sb.append(", fans=").append(fans);
        sb.append(", description=").append(description);
        sb.append(", status=").append(status);
        sb.append(", createTime=").append(createTime);
        sb.append(", updateTime=").append(updateTime);
        sb.append(", roleId=").append(roleId);
        sb.append(", type1=").append(type1);
        sb.append(", type2=").append(type2);
        sb.append(", type3=").append(type3);
        sb.append(", type4=").append(type4);
        sb.append(", type5=").append(type5);
        sb.append(", value1=").append(value1);
        sb.append(", value2=").append(value2);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}